﻿using System;
using Mono.Options;
using TfsWrapper.OperationModes;

namespace TfsWrapper
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            var mode = OperationMode.Standalone;

            var options = new OptionSet { {"m|mode=", m => mode = OperationMode.FromKey(m)} };
            
            try
            {
                var remainingArgs = options.Parse(args);

                mode.Execute(remainingArgs);
            }
            catch (Exception e)
            {
                Console.Error.WriteLine(e);
            }
        }
    }
}